//
//  GHReateTableViewCell.m
//  GodHorses
//
//  Created by Mac on 2017/11/15.
//  Copyright © 2017年 stoneobs@icloud.com. All rights reserved.
//

#import "GHOrderRebeatTableViewCell.h"
@interface GHOrderRebeatTableViewCell()
@property(nonatomic, strong) UILabel                     *timeLable;
@property(nonatomic, strong) UILabel                     *titleLable;
@property(nonatomic, strong) UILabel                     *priceLable;
@property(nonatomic, strong) UILabel                     *todayLable;
@end
@implementation GHOrderRebeatTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self configSubView];
    }
    return self;
}
#pragma mark --subView
- (void)configSubView{
    self.backgroundColor = [UIColor whiteColor];
    
    //值
    CGFloat lableWith = UIScreenWidth / 4;
    UIView * valueView = [[UIView alloc] initWithFrame:CGRectMake(0, 0 , UIScreenWidth, 50)];
    valueView.backgroundColor = [UIColor whiteColor];
    [self addSubview:valueView];
    [valueView st_showBottomLineAndWitdh:valueView.st_width];
    self.timeLable = [self defultLableTitle:@"2014.09.18" showRigthLine:YES];
    self.timeLable.st_left = 0;
    [valueView addSubview:self.timeLable];
    
    self.titleLable = [self defultLableTitle:@"钻石版" showRigthLine:YES];
    self.titleLable.st_left = 0 + lableWith;
    [valueView addSubview:self.titleLable];
    
    self.priceLable = [self defultLableTitle:@"￥3000" showRigthLine:YES];
    self.priceLable.st_left = 0 + 2 *lableWith;
    [valueView addSubview:self.priceLable];
    self.todayLable = [self defultLableTitle:@"3" showRigthLine:NO];
    self.todayLable.st_left = 0 + 3 *lableWith;
    [valueView addSubview:self.todayLable];
}
- (UILabel*)defultLableTitle:(NSString*)title showRigthLine:(BOOL)showRigthLine{
    STLabel * titleLable = [[STLabel alloc] initWithFrame:CGRectMake(0, 0, UIScreenWidth / 4, 50)
                                                     text:title
                                                textColor:GH_firstTextColor
                                                     font:14
                                              isSizetoFit:NO
                                            textAlignment:NSTextAlignmentCenter];
    if (showRigthLine) {
        [titleLable st_showRightLine:50];
    }
    return titleLable;
    
}
@end

